package mcjunkin.gui;
import java.awt.*;
import javax.swing.*;

/**
	This is the frame that controls the execution of the algorithm.
*/

public class MainFrame extends JFrame {


	//references to widgets
	private ControlWidget cw;
	private OutputWidget ow;
	private StatusWidget sw;

	/**
		Constructor.
	*/

	public MainFrame(){
	
		//get a convenient reference to the content pane
		Container c = this.getContentPane();
		c.setLayout(new BoxLayout(c, BoxLayout.Y_AXIS));

		//add a control widget
		sw = new StatusWidget();
		cw = new ControlWidget(sw);
		ow = new OutputWidget();

		//add to layouts
		c.add(cw);
		c.add(ow);
		c.add(sw);
	}
	
	/** Returns a reference to the output widget. */
	public OutputWidget getOutputWidget(){
		return ow;
	}

	/** Returns a reference to the control widget. */
	public ControlWidget getControlWidget(){
		return cw;
	}

	/** Returns a reference to the status widget. */
	public StatusWidget getStatusWidget(){
		return sw;
	}

}


